package com.xrx.project.openthree.service;


import com.xrx.project.openthree.mapper.UserMapper;
import com.xrx.project.openthree.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userService")
public class UserServcie {

    @Autowired
    private UserMapper userMapper;


    /**
     * 查询所有
     * @return
     */
    public List<User> findUserList(){
        return null;//userMapper.findUserList();
    }

    /**
     * 根据用户id查询
     * @param id
     * @return
     */
    public User findByUserId(Long id){
        return userMapper.selectByPrimaryKey(id);
    }

    /**
     * 新增
     * @param user
     */
    public void insertUser(User user){
        userMapper.insertSelective(user);
    }

}
